package T4;

public class Point extends T2.Point {

    public Point() {
        super(0,0);
    }

    public Point(int x,int y) {
        super(x,y);
    }
    @Override
    public String toString() {
        return "("+this.getX()+","+this.getY()+")";
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj){
            return true;
        } else if (obj instanceof T2.Point) {
            T2.Point point = (T2.Point) obj; //向下转型
            return this.getX() == point.getX() && this.getY() == point.getY();
        }else return false;
    }
}
